package cn.tedu;

public class PrivateDog {
    public static void main(String[] args) {
        computer c = new computer();
        c.setHost("计划");
        c.setMemory(4.5);
        c.setBrand("联想");
        c.setColor("炽火青");
        c.setDuration(12);
        c.setPrice(5452.54);
        System.out.println("此电脑的类型是："+c.getBrand());
        System.out.println("此电脑的颜色是："+c.getColor());
        System.out.println("此电脑的主人是："+c.getHost());
        System.out.println("此电脑的时长是："+c.getDuration());
        System.out.println("此电脑的内存是："+c.getMemory());
        System.out.println("此电脑的价格是："+c.getPrice());
        c.keep(c.getHost());
        String r = c.keep(c.getHost());
        System.out.println(r);
        System.out.println(c.keep(c.getHost()));
    }
}
class computer{
    private double price;//价格
    private int duration;//时长
    private String color;//颜色
    private double Memory;//内存

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public int getDuration() {
        return duration;
    }

    public void setDuration(int duration) {
        this.duration = duration;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getMemory() {
        return Memory;
    }

    public void setMemory(double memory) {
        Memory = memory;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    private String brand;//品牌
    private String host;//主人
    public void rum(){
        System.out.println("我的运行速度第一");
    }
    public void Fine(){
        System.out.println("我可以保存文件");
//        Electric();
    }
    public String keep(String hort){
        System.out.println(host + "主人按快捷键可以保存文件");
        Electric();
        return "卡bug";
    }
    private void Electric(){
        System.out.println("电量不足");
    }
}